<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <f:view contentType="text/html">
        <h:outputStylesheet library="css" name="default.css"/>
        <h:head>
            <title>Mantenimiento Hitos</title>
        </h:head>
        <h:body >
            <h:form id="formHit">
            <p:messages id="messages" showDetail="true" autoUpdate="true" closable="true" />
                <h:panelGrid columns="2" columnClasses="alinder2,alinizq" id="grid"  >

                    
                    <p:outputLabel value="Carrera" for="car001" styleClass="requiredLbl"/>
                    <p:inputText value="#{ctrHitos.activeReg.cnombre}" label="Nombre" id="car001" size="30" required="true" >
                        <f:validateLength maximum="30" />
                    </p:inputText>

                    <p:outputLabel value=" Descripción"  styleClass="optionalLbl" for="car002"/>
                    <p:inputTextarea rows="10" cols="60" value="#{ctrHitos.activeReg.cdescripcion}" id="car002"  label="Descripción">
                         <f:validateLength maximum="100" />
                   </p:inputTextarea > 
                  
                 
                    <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                    <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                    <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                    <h:panelGroup/><h:panelGroup/><h:panelGroup/><h:panelGroup/>
                    <p:commandButton value="Save"  id="saveCar" actionListener="#{ctrHitos.save}" />
                    <p:commandButton actionListener="#{ctrHitos.delete}" value="Delete" id="deleteCar" rendered="#{not ctrHitos.lnuevo}" >
                        <p:confirm header="Confirmación" message="¿Esta seguro que quiere borrar esta carrera?" icon="ui-icon-alert" />
                    </p:commandButton>

                    <p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
                        <p:commandButton value="Si" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
                        <p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
                    </p:confirmDialog>
                </h:panelGrid>
            </h:form>
        </h:body>
    </f:view>
</html>

